import axios from "../../../axios";
import qs from 'qs'
import { Axis } from "echarts";
//用户列表  渲染
export const getUserListStart = (param) => {
    return axios.request({
        url:'/shops/admin/allUser',
        params:param
    })
}
//删除用户
export const handleDeleteStart =(param) =>{
    return axios.request({
        url:'/shops/admin/delUser',
        params:param,
        method:'DELETE'
    })
}
//批量删除用户
export const batchDeleteStart = (param)=>{
    return axios.request({
        url:'/shops/admin/delUser',
        method:'DELETE',
        params:param,
        paramsSerializer: params => {
            return qs.stringify(params, { indices: false })  //直接传数组传不过去，这样传才会每一个id值都匹配在路径上
          },
    })
}
//模糊查找用户
export const searchUserStart = (param) => {
    return axios.request({
        url:'/shops/admin/selectUser',
        params:param
    })
}
//封禁用户
export const closeUserStart = (param) => {
    return axios.request({
        url:'/shops/admin/banUser',
        method:'POST',
        params:param
    })
}

//封禁用户列表  渲染
export const getCloseUserStart = (param) => {
    return axios.request({
        url:''
    })
}
